package com.my.behaviourtype.chain.hierarchy;


public class ProjectManager extends Handler {
	
	/*public ProjectManager(Handler handler) {
		super(handler);
	}*/

	// 自己处理不了就交给下一级
	@Override
	public void handleRequest(String applicant, double fee) {
		if(fee < 500) {
			if(applicant.equals("tom")) {
				System.out.println("ProjectManager approve fee:" + fee);
			} else {
				System.out.println("ProjectManager don't approve fee:" + fee);
			}
		} else if(fee >= 500) {
			this.getHandler().handleRequest(applicant, fee);
		} else {
			System.out.println("wrong fee");
			throw new RuntimeException("wrong fee");
		}
	}

}
